<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <style>
    div{
        width:200px;
        height: 200px;
        background: #ff2d51;
        /* 
        box-sizing:border-box
        给元素border，padding不会改变它的width，height
         */
         box-sizing: border-box;
         border: 10px solid black;
         padding: 10px;
    }
    </style>

</head>
<body>
   <div>
       
   </div>   
</body>
</html>